package edu.hhu.controller;

import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSON;
import com.jfinal.core.Controller;
import com.jfinal.ext.render.excel.PoiRender;

import edu.hhu.dynamic.table.TableService;
import tree.TreeService;

public class TableController extends Controller{
	public void showTable() {
		//wellcode节点
		String nodeStr=this.getPara("nodeStr");
		nodeStr=nodeStr.substring(0, nodeStr.length()-1);
		//属性指标
		String fieldStr=this.getPara("fieldStr");
		fieldStr=fieldStr.substring(0, fieldStr.length()-1);
		//开始日期 截至日期
		String s_date=this.getPara("s_date");
		String e_date=this.getPara("e_date");
		//分页信息
		String page=this.getPara("page");
		String limit=this.getPara("limit");
		String start=this.getPara("start");
		//真假表切换
		String tablename=this.getPara("tablename");
		//tablename="pcdtsjtrue";

		TableService tableservice=new TableService();
		//返回table数据
		String json=tableservice.getData(tablename,nodeStr, fieldStr, s_date, e_date,start,limit);

		renderJson(json);
	}
	
	

}
